package com.olinsports.system.olinsportssystem.manager;

import com.olinsports.system.olinsportssystem.model.CommodityDetailed;
import com.olinsports.system.olinsportssystem.model.CommodityType;
import com.olinsports.system.olinsportssystem.service.CommodityDetailedService;
import com.olinsports.system.olinsportssystem.service.CommodityTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/7/22.
 */
@Component
public class CommodityDetailedManager {
    @Autowired
    private CommodityDetailedService commodityDetailedService;
    public List<CommodityDetailed> selectAll(){
        return commodityDetailedService.selectAll();
    }
    public int insertAll(CommodityDetailed commodityDetailed){
        return commodityDetailedService.insertAll(commodityDetailed);
    }
    public int deleteByKey(int detailedKey){
        return commodityDetailedService.deleteByKey(detailedKey);
    }
    public int updateData(CommodityDetailed commodityDetailed){
        return commodityDetailedService.updateData(commodityDetailed);
    }

    public CommodityDetailed selectByKey(int detailedKey){
        return commodityDetailedService.selectByKey(detailedKey);
    }

    public int saveOrUpdateCommDetal(CommodityDetailed commodityDetailed,int typeKey){
        return commodityDetailedService.saveOrUpdateCommDetal(commodityDetailed,typeKey);
    }
    public Map listDetailed(String page, String rows, boolean _search, String sord, String sidx){
        return commodityDetailedService.listDetailed(page,rows,_search,sord,sidx);
    }

    public Map searchSelf(String page, String rows,String field,String fieldValue){
        return commodityDetailedService.searchSelf(page,rows,field,fieldValue);
    }

    public List<CommodityDetailed> selectBySkuType(int skuType){
        return commodityDetailedService.selectBySkuType(skuType);
    }
}
